home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / XFDISK.ZIP / CP3204.DOC < prev    next >
Text File  |  1991-08-28  |  71KB  |  1,479 lines

  1. @echo off
  2. echo  
  3. echo CP3204  version 1.00  August 28, 1991
  4. echo Fixed Disk Preparation and Partitioning Software.
  5. echo Copyright (C) 1991 Dennis W. Person.  All rights reserved.
  6. echo  
  7. echo  ┌────────────────────────────────────────────────────────────────────────────┐
  8. echo  │  This DOC file is also the program BAT file.                               │
  9. echo  │  You should print this DOC file before you try to run the program.         │
  10. echo  │                                                                            │
  11. echo  │  !!!!!!!!!! THIS PROGRAM CAN DESTROY DATA ON YOUR FIXED DISK. !!!!!!!!!!   │
  12. echo  │                                                                            │
  13. echo  │  Read and understand the information contained in this DOC file before     │
  14. echo  │  you attempt to use this program to partition your fixed disk.             │
  15. echo  └────────────────────────────────────────────────────────────────────────────┘
  16. echo  
  17. echo Press CTRL-C to terminate this program or . . .
  18. pause
  19.  
  20. if [%4]==[]    goto GETFILE
  21. if [%4]==[rem] goto GETFILE
  22. if [%4]==[REM] goto GETFILE
  23. goto HELP
  24.  
  25. :GETFILE
  26. set OUTFILE=NUL
  27. if [%3]==[]    goto OPTIONS
  28. if [%3]==[NUL] goto OPTIONS
  29.   set OUTFILE=%3.LST
  30.  
  31. :OPTIONS
  32. set OPTION=PREPARE
  33. if [%2]==[p] goto GETDRIV
  34. if [%2]==[P] goto GETDRIV
  35.  
  36. set OPTION=RESTORE
  37. if [%2]==[r] goto GETDRIV
  38. if [%2]==[R] goto GETDRIV
  39. goto HELP
  40.  
  41. :GETDRIV
  42. if [%1]==[/1] goto CONTINUE
  43. if [%1]==[/2] goto CONTINUE
  44. goto HELP
  45.  
  46. :CONTINUE
  47. echo BEGIN - creation of CP3204.SCR
  48.  
  49. rem Check for existence of DEBUG script file.
  50. if [%1]==[/1] if exist CP3204.1%2%4 ren CP3204.1%2%4 CP3204.SCR
  51. if [%1]==[/2] if exist CP3204.2%2%4 ren CP3204.2%2%4 CP3204.SCR
  52.  
  53. rem Use existing DEBUG script file to partition drive to save processing time.
  54. if exist CP3204.SCR goto RUN
  55.   goto BEGIN
  56.  
  57. rem 
  58. :HELP
  59. cls
  60. echo This program will partition the Conner Peripherals CP-3204 IDE fixed disk.
  61. echo The CP-3204 physically has 1369 cylinders, 8 heads, and 38 sectors per track.
  62. echo Since the number of cylinders is greater than the 1024 allowed by DOS, the
  63. echo logical setup used is 544 cylinders, 15 heads, and 51 sectors per track.
  64. echo The CP-3204 does the logical to physical translation.  The logical setup is
  65. echo user defined and entered by the user using a BIOS that allows for a user
  66. echo defined fixed disk type.  In my case, I patched the BIOS ROM to allow for the
  67. echo user type I had chosen.
  68. echo  
  69. echo Be aware that DOS uses 1 less cylinder than specified in the fixed disk
  70. echo parameter table.  This is because the last cylinder is considered the
  71. echo diagnostic cylinder. If you wish to use the diagnostic cylinder for data,
  72. echo increase the number of cylinders specified during the setup by 1.  Only do
  73. echo this if you do not want the diagnostic cylinder available.  In my case,
  74. echo I entered 545 as the number of cylinders during the setup.  This allows
  75. echo me to use all 544 cylinders for data.
  76. echo  
  77. echo One additional note, the astute reader will have discovered that the
  78. echo physical parameters give 416,176 sectors available on the CP-3204.  The
  79. echo chosen logical parameters give 416,160 sectors available.  The chosen
  80. echo parameters give the closest match to using all the available sectors.
  81. echo  
  82. echo Now, to see the command syntax to run this program . . .
  83. pause
  84.  
  85. cls
  86. echo  
  87. echo Command:  CP3204 [/1│/2] [R│P] [list_file│NUL] [REM]
  88. echo  
  89. echo           /1  Select 1st fixed disk.
  90. echo           /2  Select 2nd fixed disk.
  91. echo            R  Restore fixed disk partitions.
  92. echo            P  Prepare and partition fixed disk.
  93. echo    list_file  Filename.LST to capture DEBUG output if desired.
  94. echo               Do NOT enter the default .LST extension.
  95. echo          NUL  Use NUL as the filename if no output file is desired but,
  96. echo               the REM option is desired.
  97. echo          REM  Remarks only {will still create DEBUG script file}.
  98. echo               Useful to check script file before actual disk partitioning.
  99. echo  
  100. echo Options must be entered in the order shown and separated by a space.
  101.  
  102. goto EXIT
  103.  
  104. rem 
  105. :BEGIN
  106. rem  Partition Program Code
  107. rem  ──────────────────────
  108. rem  The program code to write the partition sector, boot sector, and first FAT
  109. rem  sector to fixed disk partition.  This code will be executed for each
  110. rem  logical drive on the fixed disk.  The DEBUG script that follows will setup
  111. rem  the partition sector and boot sector data for each logical drive.  The DEBUG
  112. rem  script will then control execution of the program code.
  113.  
  114. rem  Clear program work area.
  115. echo F 0100 07FF 0                                                             > CP3204.SCR
  116.  
  117. echo A 100                                                                    >> CP3204.SCR
  118. echo MOV AX,CS   ; get CS register                                            >> CP3204.SCR
  119. echo MOV DS,AX   ; initialize DS register                                     >> CP3204.SCR
  120. echo MOV ES,AX   ; initialize DS register                                     >> CP3204.SCR
  121. echo ;                                                                        >> CP3204.SCR
  122. echo MOV AH,30   ; get function code to check DOS version                     >> CP3204.SCR
  123. echo INT 21      ; call DOS routine to get version number                     >> CP3204.SCR
  124. echo CMP AL,5    ; check for DOS version 5.00 or higher                       >> CP3204.SCR
  125. echo JGE 112     ; JGE CONTINUE to partition fixed disk                       >> CP3204.SCR
  126. echo ;             otherwise, incorrect DOS version                           >> CP3204.SCR
  127. echo MOV AL,80   ; set ERRORLEVEL value to indicate incorrect DOS version     >> CP3204.SCR
  128. echo JMP 130     ; JMP ERROR                                                  >> CP3204.SCR
  129. echo ;                                                                        >> CP3204.SCR
  130. echo ;[CONTINUE]                                                              >> CP3204.SCR
  131. echo MOV SI,0003 ; initalize loop counter                                     >> CP3204.SCR
  132. echo ;                                                                        >> CP3204.SCR
  133. echo ;[LOOP]                                                                  >> CP3204.SCR
  134. echo MOV AH,03   ; get function code to write to disk                         >> CP3204.SCR
  135.  
  136. rem If [P] option chosen, write the partition, boot, and 1st FAT sectors.
  137. if [%2]==[P] echo MOV AL,03   ; get number of sectors to write                >> CP3204.SCR
  138. if [%2]==[p] echo MOV AL,03   ; get number of sectors to write                >> CP3204.SCR
  139.  
  140. rem If [R] option chosen, only write the partition and boot sectors
  141. if [%2]==[R] echo MOV AL,02   ; get number of sectors to write                >> CP3204.SCR
  142. if [%2]==[r] echo MOV AL,02   ; get number of sectors to write                >> CP3204.SCR
  143.  
  144. echo MOV BX,0200 ; ES:BX points to beginning of data                          >> CP3204.SCR
  145. echo MOV CX,0001 ; set CH to low order byte for cylinder number               >> CP3204.SCR
  146. echo ;             set CL lower 6-bits to sector number                       >> CP3204.SCR
  147. echo ;             set CL upper 2-bits to high order bits for cylinder number >> CP3204.SCR
  148. echo MOV DH,00   ; get number for head (side)                                 >> CP3204.SCR
  149.  
  150. if [%1]==[/1] echo MOV DL,80   ; get drive number for 1st fixed disk          >> CP3204.SCR
  151. if [%1]==[/2] echo MOV DL,81   ; get drive number for 2nd fixed disk          >> CP3204.SCR
  152.  
  153. echo INT 13      ; call BIOS routine which provides disk services             >> CP3204.SCR
  154. echo JNC 0134    ; JNC WRITEOK if no error                                    >> CP3204.SCR
  155. echo ;             otherwise, . . .                                           >> CP3204.SCR
  156. echo MOV AH,0    ; get function code to reset disk system                     >> CP3204.SCR
  157. echo INT 13      ; call BIOS routine which provides disk services             >> CP3204.SCR
  158. echo DEC SI      ; decrement loop counter                                     >> CP3204.SCR
  159. echo JNZ 0115    ; JNZ LOOP to try to write to disk again                     >> CP3204.SCR
  160. echo ;             otherwise, . . .                                           >> CP3204.SCR
  161. echo MOV AL,02   ; set ERRORLEVEL value to indicate error                     >> CP3204.SCR
  162. echo ;           ; and . . .                                                  >> CP3204.SCR
  163. echo ;[ERROR]      terminate program with ERRORLEVEL value                    >> CP3204.SCR
  164. echo MOV AH,4C   ; get function code to teminate program                      >> CP3204.SCR
  165. echo INT 21      ; and exit program                                           >> CP3204.SCR
  166. echo ;                                                                        >> CP3204.SCR
  167. echo ;[WRITEOK]                                                               >> CP3204.SCR
  168. echo MOV AL,00   ; set ERRORLEVEL value to indicate success                   >> CP3204.SCR
  169. echo MOV AH,4C   ; get function code to teminate program                      >> CP3204.SCR
  170. echo INT 21      ; and exit program                                           >> CP3204.SCR
  171. echo NOP                                                                      >> CP3204.SCR
  172. echo                                                                        >> CP3204.SCR
  173. rem  Use CTRL-H (BACKSPACE) character for ^H shown on the line above.
  174. echo   creation of Partition Program complete . . .
  175.  
  176. rem If 2nd fixed disk option chosen, do NOT put Partiton Boot Program on disk.
  177. if [%1]==[/2] goto PUTABLE
  178. rem 
  179. rem  Partition Boot Program
  180. rem  ──────────────────────
  181. rem  This is the partition boot program for the 1st fixed disk.  The program
  182. rem  must be physically located on the 1st sector of the fixed disk, i.e.,
  183. rem  cylinder 0, head 0, sector 1.
  184.  
  185. echo A 200                  >> CP3204.SCR
  186. echo CLI                    >> CP3204.SCR
  187. echo XOR AX,AX              >> CP3204.SCR
  188. echo MOV DS,AX              >> CP3204.SCR
  189. echo MOV ES,AX              >> CP3204.SCR
  190. echo MOV SS,AX              >> CP3204.SCR
  191. echo MOV SP,7C00            >> CP3204.SCR
  192. echo MOV SI,SP              >> CP3204.SCR
  193. echo STI                    >> CP3204.SCR
  194. echo CLD                    >> CP3204.SCR
  195. echo MOV DI,600             >> CP3204.SCR
  196. echo MOV CX,100             >> CP3204.SCR
  197. echo REPNZ                  >> CP3204.SCR
  198. echo MOVSW                  >> CP3204.SCR
  199. echo JMP 0:61D              >> CP3204.SCR
  200. echo MOV SI,7BE             >> CP3204.SCR
  201. echo MOV BL,4               >> CP3204.SCR
  202. echo CMP BYTE PTR [SI],80   >> CP3204.SCR
  203. echo JZ 235                 >> CP3204.SCR
  204. echo CMP BYTE PTR [SI],0    >> CP3204.SCR
  205. echo JNZ 248                >> CP3204.SCR
  206. echo ADD SI,+10             >> CP3204.SCR
  207. echo DEC BL                 >> CP3204.SCR
  208. echo JNZ 222                >> CP3204.SCR
  209. echo INT 18                 >> CP3204.SCR
  210. echo MOV DX,[SI]            >> CP3204.SCR
  211. echo MOV CX,[SI+2]          >> CP3204.SCR
  212. echo MOV BP,SI              >> CP3204.SCR
  213. echo ADD SI,+10             >> CP3204.SCR
  214. echo DEC BL                 >> CP3204.SCR
  215. echo JZ 25D                 >> CP3204.SCR
  216. echo CMP BYTE PTR [SI],0    >> CP3204.SCR
  217. echo JZ 23C                 >> CP3204.SCR
  218. echo MOV SI,68B             >> CP3204.SCR
  219. echo LODSB                  >> CP3204.SCR
  220. echo CMP AL,0               >> CP3204.SCR
  221. echo JZ 25B                 >> CP3204.SCR
  222. echo PUSH SI                >> CP3204.SCR
  223. echo MOV BX,7               >> CP3204.SCR
  224. echo MOV AH,E               >> CP3204.SCR
  225. echo INT 10                 >> CP3204.SCR
  226. echo POP SI                 >> CP3204.SCR
  227. echo JMP 24B                >> CP3204.SCR
  228. echo JMP 25B                >> CP3204.SCR
  229. echo MOV DI,3               >> CP3204.SCR
  230. echo PUSH DI                >> CP3204.SCR
  231. echo MOV BX,7C00            >> CP3204.SCR
  232. echo MOV AX,201             >> CP3204.SCR
  233. echo INT 13                 >> CP3204.SCR
  234. echo POP DI                 >> CP3204.SCR
  235. echo JNC 278                >> CP3204.SCR
  236. echo XOR AX,AX              >> CP3204.SCR
  237. echo INT 13                 >> CP3204.SCR
  238. echo DEC DI                 >> CP3204.SCR
  239. echo JNZ 260                >> CP3204.SCR
  240. echo MOV SI,6A5             >> CP3204.SCR
  241. echo JMP 24B                >> CP3204.SCR
  242. echo MOV SI,6C6             >> CP3204.SCR
  243. echo MOV DI,7DFE            >> CP3204.SCR
  244. echo CMP WORD PTR [DI],AA55 >> CP3204.SCR
  245. echo JNZ 24B                >> CP3204.SCR
  246. echo MOV SI,BP              >> CP3204.SCR
  247. echo JMP 0:7C00             >> CP3204.SCR
  248. echo                      >> CP3204.SCR
  249. rem  Use CTRL-H (BACKSPACE) character for ^H shown on the line above.
  250.  
  251. echo E 28B D A "Invalid Partition Table" 0        >> CP3204.SCR
  252. echo E 2A5 D A "Error Loading Operating System" 0 >> CP3204.SCR
  253. echo E 2C6 D A "Missing Operating System" 0       >> CP3204.SCR
  254.  
  255. rem 
  256. :PUTABLE
  257. rem  The master partition table also resides on the 1st sector following the
  258. rem  master boot program.  The following line is to initialize the partition
  259. rem  table.  See below for information on the partition table.
  260. echo F 2E1 3FD 0 >> CP3204.SCR
  261.  
  262. rem  The two bytes below MUST be as shown in order for the BIOS the recognize
  263. rem  the fixed disk.  The bytes represent that the partition sector is valid.
  264. rem  Write signature to indicate valid partition sector.
  265. echo E 3FE 55 AA >> CP3204.SCR
  266.  
  267. echo   creation of partition sector complete . . .
  268.  
  269. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  270. rem  ═══════════════════════════════════════════════════════════════════════════════
  271. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  272. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  273. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  274. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  275. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  276. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  277. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  278. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  279. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  280.  
  281. rem  NOTE:  The partition table allows a maximum of four (4) partitions.
  282. rem         See the following pages for sector offset to each item in the table.
  283.  
  284. rem         Only one partition can be marked as the boot partition with the code
  285. rem         80 hex.  The other partitions MUST contain 0 as the boot byte.
  286. rem         Invalid codes will produce the "Invalid Partition Table" message and
  287. rem         prevent your system from booting.
  288.  
  289. rem  For a fixed disk with a PRIMARY partition, FDISK will reserve the entire first
  290. rem  track.  Programs such as Ontrack's Disk Manager use those reserved sectors to
  291. rem  store their own disk information.  So, if you are using one of those programs,
  292. rem  do NOT use this program.
  293.  
  294. rem  For a fixed disk with only an EXTENDed partition, FDISK will reserve the entire
  295. rem  first cylinder of the disk for the Master Partition Table.  Each logical drive
  296. rem  in an EXTENDed partition also requires a partition table.  So, FDISK will also
  297. rem  reserve the first track of each logical drive for the partition table.
  298.  
  299. rem  Since the partition table only requires 1 sector, DOS is wasting your hard disk
  300. rem  space.  The information on the following pages will allow you to reclaim the
  301. rem  disk space that DOS does not use.  Remember, the procedure can only be used
  302. rem  if your fixed disk does NOT require a program such as Ontrack's Disk Manager.
  303.  
  304. rem  Additional information regarding systems with 2 fixed disks is shown on the
  305. rem  following page.  The information will allow you to decide whether to partition
  306. rem  the 2nd fixed disk with a PRIMARY partition and an EXTENDEDed partition OR with
  307. rem  only an EXTENDEDed partition.  I chose to partition the 2nd fixed disk with only
  308. rem  an EXTENDEDed partition.
  309.  
  310. rem 
  311. rem  Shown below are the drive letters assigned by DOS to the logical drives on each
  312. rem  fixed disk.  Note that the PRIMARY partitions have priority in drive letter
  313. rem  assignments.  The PRIMARY partition on the 1st fixed disk is always drive C:.
  314. rem  The PRIMARY partition on the 2nd fixed disk is always drive D:.  Additional
  315. rem  logical drives are then assigned to the 1st fixed disk, then to the 2nd fixed
  316. rem  disk.
  317.  
  318. rem       PRIMARY and EXTENDed partition on 1st fixed disk
  319. rem       ────────────────────────────────────────────────
  320. rem       PRIMARY partition  ── C:
  321. rem       EXTENDed partition ── D: E: F: , etc.
  322.  
  323. rem       Extended partition on 2nd fixed disk
  324. rem       ────────────────────────────────────
  325. rem       EXTENDed partition ── G: H: I: J: , etc.
  326.  
  327.  
  328. rem       PRIMARY and EXTENDed partition on 1st fixed disk
  329. rem       ────────────────────────────────────────────────
  330. rem       PRIMARY partition  ── C:
  331. rem       EXTENDed partition ── E: F: G: , etc.
  332.  
  333. rem       PRIMARY and EXTENDed partition on 2nd fixed disk
  334. rem       ────────────────────────────────────────────────
  335. rem       PRIMARY partition  ── D:
  336. rem       EXTENDed partition ── H: I: J: , etc.
  337.  
  338. rem 
  339. rem  Shown below is the location of each byte in the partition table.  A maximum
  340. rem  of four partitions may be defined.
  341.  
  342. rem  sector
  343. rem  offset  Parameters for 1st Partition:
  344. rem  ──────  ─────────────────────────────
  345. rem   01BE   00          ; partition status (active [80] or non-active [00])
  346. rem   01BF   00          ; starting side
  347. rem   01C0   00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  348. rem   01C1   00          ; starting cylinder (lower byte)
  349. rem   01C2   00          ; system (valid codes listed later in document)
  350. rem   01C3   00          ; ending side
  351. rem   01C4   00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  352. rem   01C5   00          ; ending cylinder (lower byte)
  353. rem   01C6   00 00 00 00 ; relative sectors
  354. rem   01CA   00 00 00 00 ; number of sectors
  355.  
  356. rem  sector
  357. rem  offset  Parameters for 2nd Partition:
  358. rem  ──────  ─────────────────────────────
  359. rem   01CE   00          ; partition status (active [80] or non-active [00])
  360. rem   01CF   00          ; starting side
  361. rem   01D0   00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  362. rem   01D1   00          ; starting cylinder (lower byte)
  363. rem   01D2   00          ; system (valid codes listed later in document)
  364. rem   01D3   00          ; ending side
  365. rem   01D4   00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  366. rem   01D5   00          ; ending cylinder (lower byte)
  367. rem   01D6   00 00 00 00 ; relative sectors
  368. rem   01DA   00 00 00 00 ; number of sectors
  369.  
  370. rem  sector
  371. rem  offset  Parameters for 3rd Partition:
  372. rem  ──────  ─────────────────────────────
  373. rem   01DE   00          ; partition status (active [80] or non-active [00])
  374. rem   01DF   00          ; starting side
  375. rem   01E0   00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  376. rem   01E1   00          ; starting cylinder (lower byte)
  377. rem   01E2   00          ; system (valid codes listed later in document)
  378. rem   01E3   00          ; ending side
  379. rem   01E4   00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  380. rem   01E5   00          ; ending cylinder (lower byte)
  381. rem   01E6   00 00 00 00 ; relative sectors
  382. rem   01EA   00 00 00 00 ; number of sectors
  383.  
  384. rem  sector
  385. rem  offset  Parameters for 4th Partition:
  386. rem  ──────  ─────────────────────────────
  387. rem   01EE   00          ; partition status (active [80] or non-active [00])
  388. rem   01EF   00          ; starting side
  389. rem   01F0   00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  390. rem   01F1   00          ; starting cylinder (lower byte)
  391. rem   01F2   00          ; system (valid codes listed later in document)
  392. rem   01F3   00          ; ending side
  393. rem   01F4   00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  394. rem   01F5   00          ; ending cylinder (lower byte)
  395. rem   01F6   00 00 00 00 ; relative sectors
  396. rem   01FA   00 00 00 00 ; number of sectors
  397.  
  398. rem  See the following page for an explanation of each item in the partition
  399. rem  table.
  400.  
  401. rem  DOS numbers sides (heads) and cylinders starting with 0.  Sectors are
  402. rem  numbered starting with 1.
  403.  
  404. rem  Note:  The upper 2-bits of the cylinder number is contained in the upper
  405. rem         2-bits of the byte for the sector number.  This means the maximum
  406. rem         sector number is 63 and the maximum cylinder number is 1023.
  407. rem         Remember this when you are ready to prepare the partition tables
  408. rem         for your fixed disk.  Study the partition tables shown later in
  409. rem         this document.
  410.  
  411. rem 
  412. rem  The PARTITION STATUS byte is actually the drive number select byte.
  413. rem  Since the 1st hard disk is assigned the drive number 80, the partition
  414. rem  with the status byte equal to 80 will be the boot partition.  Only one
  415. rem  partition can be the active (boot) partition.  By changing the PARTITION
  416. rem  STATUS byte and the partition boot program active partition byte to 81,
  417. rem  you could boot from the 2nd fixed disk instead of the 1st fixed disk.
  418.  
  419. rem  For a DOS partition, the STARTING parameters define the physical location
  420. rem  of the logical drive boot sector.  For an EXTENDed partition, the STARTING
  421. rem  parameters define the physical location of the beginning of the EXTENDed
  422. rem  partition.  This will correspond to the physical location of the partition
  423. rem  table for the first logical drive in the EXTENDed partition.
  424.  
  425. rem  The SYSTEM byte indicates the type of partition.  Valid SYSTEM bytes are
  426. rem  listed on the page before the partition table definition for drive C: shown
  427. rem  later in this DOC file.
  428.  
  429. rem  The ENDING parameters define the physical location of the end of the
  430. rem  partition for both a DOS partition and an EXTENDed partition.
  431.  
  432. rem  For a DOS partition, RELATIVE SECTORS is the number of physical sectors
  433. rem  in the partition before the logical drive boot sector.  This number will
  434. rem  correspond to the number of hidden sectors in the BIOS Parameter Table.
  435. rem  For the fixed disk EXTENDed partition, RELATIVE SECTORS is the number of
  436. rem  physical sectors in the DOS partition.  This corresponds to the number of
  437. rem  physical sectors before the beginning of the EXTENDed partition.  For an
  438. rem  EXTENDed partition for a logical drive, RELATIVE SECTORS is the number of
  439. rem  physical sectors in the fixed disk EXTENDed partition that are before the
  440. rem  partition sector for the logical drive.
  441.  
  442. rem  For a DOS partition, NUMBER OF SECTORS is the number of sectors allocated
  443. rem  to the logical drive.  For the fixed disk EXTENDed partition, NUMBER OF
  444. rem  SECTORS is the number of sectors allocated to the EXTENDed partition.  For
  445. rem  an EXTENDed partition for a logical drive, NUMBER OF SECTORS is the number
  446. rem  of sectors allocated to the next logical drive.
  447.  
  448. rem  The partition table for each logical drive I have setup on my fixed disks
  449. rem  is shown later in this DOC file.  Study and understand the partition tables
  450. rem  before you try to setup the partition tables for your fixed disk.  The
  451. rem  partition tables are what allow the fixed disk to be divided into logical
  452. rem  drives.  Be careful as you setup the partition tables on your fixed disk.
  453.  
  454. rem  A few additional items and caveats.  You MUST use DOS version 5 or higher
  455. rem  in order for the partition structure described in this document to be
  456. rem  recognized by DOS.  Also, FDISK does not recognize the partition structure
  457. rem  I have setup on my fixed disks.  But, since the partition structure is
  458. rem  known, FDISK is NOT really needed.  In fact, the system will hang if I try
  459. rem  to run FDISK.
  460.  
  461. rem 
  462. :BOOT
  463. rem                           D O S   B O O T   S E C T O R
  464. rem  ═══════════════════════════════════════════════════════════════════════════════
  465. rem  The JMP instruction is to end of BIOS Parameter Block.  Space is prvided for
  466. rem  a 3-byte JMP instruction.  DOS reads this instruction to determine the length
  467. rem  of the BIOS Parameter Block.  So, this instruction CANNOT be eliminated from
  468. rem  the logical drives in EXTENDed partitions.
  469.  
  470. echo A 400   >> CP3204.SCR
  471. echo JMP 43E >> CP3204.SCR
  472. echo NOP     >> CP3204.SCR
  473. echo       >> CP3204.SCR
  474. rem  Use CTRL-H (BACKSPACE) character for ^H shown on the line above.
  475.  
  476. rem  sector
  477. rem  offset         B I O S   P A R A M E T E R   B L O C K   D A T A
  478. rem  ═══════════════════════════════════════════════════════════════════════════════
  479. rem   0003                            OEM ID: 8-characters
  480. rem   000B                  Bytes per sector: 0..65,535 (2-bytes)
  481. rem   000D               Sectors per cluster: 0..255    (1-byte)
  482. rem   000E     Reserved sectors at beginning: 0..65,535 (2-bytes)
  483. rem   0010                        FAT Copies: 0..255    (1-byte)
  484. rem   0011            Root directory entries: 0..65,535 (2-bytes)
  485. rem   0013             Total sectors on disk: 0..65,535 (2-bytes)
  486. rem   0015             Media descriptor byte: 1-byte (see table below)
  487. rem   0016                   Sectors per FAT: 0..65,535 (2-bytes)
  488. rem   0018                 Sectors per track: 0..65,535 (2-bytes)
  489. rem   001A                             Sides: 0..65,535 (2-bytes)
  490. rem   001C            Special hidden sectors: 0..4,294,967,295 (4-bytes)
  491.  
  492. rem  Extended BIOS Parameter Block supported by DOS 4 and DOS 5.  This is where
  493. rem  DOS 'breaks' the 32Mb disk barrier but leaves the 64K cluster barrier.
  494. rem  ═══════════════════════════════════════════════════════════════════════════════
  495. rem   0020       Big total number of sectors: 0..    (4-bytes)
  496. rem   0024             Physical drive number: 0..255 (1-byte)
  497. rem   0025                           unknown: 0..255 (1-byte)
  498. rem   0026    Extended Boot Record Signature: 29 hex (1-byte)
  499. rem   0027              Volume Serial Number: 4-byte time & date code
  500. rem   002B                      Volume Label: 11-characters
  501. rem   0036                    File System ID: 8-characters (usually FAT12 or FAT16)
  502.  
  503.  
  504. rem              V A L I D   M E D I A   D E S C R I P T O R   B Y T E S
  505. rem  ═══════════════════════════════════════════════════════════════════════════════
  506. rem   F8 ── Fixed Disk or RAM disk
  507.  
  508. rem   ?? ── 3½ inch, 2 sides, 80 tracks, 36 sectors per track ── 2.88M
  509. rem   F0 ── 3½ inch, 2 sides, 80 tracks, 18 sectors per track ── 1.44M
  510. rem   F9 ── 3½ inch, 2 sides, 80 tracks,  9 sectors per track ── 720K
  511.  
  512. rem   F9 ── 5¼ inch, 2 sides, 80 tracks, 15 sectors per track ── 1.2M
  513. rem   FC ── 5¼ inch, 1 side,  40 tracks,  9 sectors per track ── 180K
  514. rem   FD ── 5¼ inch, 2 sides, 40 tracks,  9 sectors per track ── 360K
  515. rem   FE ── 5¼ inch, 1 side,  40 tracks,  8 sectors per track ── 160K
  516. rem   FF ── 5¼ inch, 2 sides, 40 tracks,  8 sectors per track ── 320K
  517.  
  518. rem   Values above are hex codes.
  519.  
  520. rem  NOTE:  The descriptor byte F9 is used for both the 5¼ inch 1.2Mb floppy
  521. rem         and the 3½ inch 720Kb floppy.  (I don't know why DOS does that.)
  522.  
  523. rem         The descriptor byte for the 2.88Mb floppy supported by DOS 5.00
  524. rem         is not known.
  525.  
  526. rem 
  527. rem  The specific BIOS Parameter Block for the chosen logical disk size is
  528. rem  shown below.  Note the cluster (allocation unit) size of 1K, 2 sectors per
  529. rem  cluster.  Although this increases the FAT size, the data area lost for
  530. rem  files will be made up by reduced waste at the end of files.
  531.  
  532. rem  The number of clusters on the disk cannot exceed 65,534.  This is because
  533. rem  the cluster number is represented by 16-bits.  Since the first four bytes
  534. rem  of the FAT are reserved for the media description, the first cluster
  535. rem  available is cluster 2.  So, DOS will adjust the number of sectors per
  536. rem  cluster to 2, 4, 8, etc. to keep to number of clusters less than 65,534.
  537.  
  538. rem  Use the following formulas to determine the the number of FAT sectors
  539. rem  required for each FAT.  DOS requires that 2 FAT's exist on all fixed disks.
  540. rem  You cannot eliminate a FAT to gain data space.
  541.  
  542. rem                     total_data_sectors      2 bytes_per_cluster (FAT16)
  543. rem  sectors_per_FAT =  ───────────────────  X  ────────────────────
  544. rem                     sectors_per_cluster     512 bytes_per_sector
  545.  
  546. rem  total_data_sectors = total_disk_sectors - reserved_sectors - root_directory_sectors
  547. rem                       - 2 X sectors_per_FAT
  548. rem                                                    32 bytes_per_entry
  549. rem  root_directory_sectors = root_directory_entries X ────────────────────
  550. rem                                                    512 bytes_per_sector
  551.  
  552. rem  sector
  553. rem  offset               B I O S   P A R A M E T E R   B L O C K   D A T A
  554. rem  ═══════════════════════════════════════════════════════════════════════════════
  555. rem   0003                            OEM ID: DWPerson
  556. rem   000B                  Bytes per sector: 512           ; all DOS disks use 512
  557. rem   000D               Sectors per cluster: 2             ; 1K cluster size
  558. rem   000E     Reserved sectors at beginning: 1             ; number of boot sectors
  559. rem   0010                        FAT Copies: 2             ; must be 2
  560. rem   0011            Root directory entries: 512           ; default value
  561. rem   0013             Total sectors on disk: 0             ; 0 indicates BIGDOS
  562. rem   0015             Media descriptor byte: F8 hex        ; indicates fixed disk
  563. rem   0016                   Sectors per FAT: 203           ; use formulas shown above
  564. rem   0018                 Sectors per track: 51            ; fixed disk parameter
  565. rem   001A                             Sides: 15            ; fixed disk parameter
  566. rem   001C            Special hidden sectors: 1             ; partition sector
  567. rem   0020       Big total number of sectors: 104039        ; logical disk size
  568. rem   0024             Physical drive number: 128           ; 1st fixed disk number
  569. rem   0025                           unknown: 0             ; reserved parameter byte
  570. rem   0026    Extended Boot Record Signature: 29 hex        ; significance unknown
  571. rem   0027              Volume Serial Number: 1991-0831 hex ; choosen serial number
  572. rem   002B                      Volume Label: FDISK1 VOL1   ; same as in directory
  573. rem   0036                    File System ID: FAT16         ; use 2 bytes in FAT
  574.  
  575. rem  The actual BIOS Parameter Block data.
  576. rem  Remember, data order is low-byte, then high-byte.
  577. echo E 403 "DWPerson"       >> CP3204.SCR
  578. echo E 40B 00 02            >> CP3204.SCR
  579. echo E 40D 02               >> CP3204.SCR
  580. echo E 40E 01 00            >> CP3204.SCR
  581. echo E 410 02               >> CP3204.SCR
  582. echo E 411 00 02            >> CP3204.SCR
  583. echo E 413 00 00            >> CP3204.SCR
  584. echo E 415 F8               >> CP3204.SCR
  585. echo E 416 CB 00            >> CP3204.SCR
  586. echo E 418 33 00            >> CP3204.SCR
  587. echo E 41A 0F 00            >> CP3204.SCR
  588. echo E 41C 01 00 00 00      >> CP3204.SCR
  589. echo E 420 67 96 01 00      >> CP3204.SCR
  590.  
  591. if [%1]==[/1] echo E 424 80 >> CP3204.SCR
  592. if [%1]==[/2] echo E 424 81 >> CP3204.SCR
  593.  
  594. echo E 425 00               >> CP3204.SCR
  595. echo E 426 29               >> CP3204.SCR
  596. echo E 427 31 08 91 19      >> CP3204.SCR
  597. echo E 42B "FDISK"          >> CP3204.SCR
  598.  
  599. if [%1]==[/1] echo E 430 "1" >> CP3204.SCR
  600. if [%1]==[/2] echo E 430 "2" >> CP3204.SCR
  601.  
  602. echo E 431 " VOL"            >> CP3204.SCR
  603. echo E 435 "?"               >> CP3204.SCR
  604. echo E 436 "FAT16   "        >> CP3204.SCR
  605.  
  606. rem 
  607. if [%1]==[/2] goto PUTSIGN
  608.  
  609. rem  DOS Boot Program
  610. rem  ────────────────
  611. rem  This is the DOS boot program which resides as the first logical sector of
  612. rem  of the boot disk.  The boot sector includes the BIOS Parameter Block (BPB)
  613. rem  at the beginning of the boot sector.  At boot, DOS reads the BPB of each
  614. rem  logical disk to determine the logical parameters of the disk.
  615.  
  616. echo A 43E                  >> CP3204.SCR
  617. echo CLI                    >> CP3204.SCR
  618. echo XOR AX,AX              >> CP3204.SCR
  619. echo MOV ES,AX              >> CP3204.SCR
  620. echo MOV SS,AX              >> CP3204.SCR
  621. echo MOV SP,7C00            >> CP3204.SCR
  622. echo MOV BX,78              >> CP3204.SCR
  623. echo SS: LDS SI,[BX]        >> CP3204.SCR
  624. echo PUSH DS                >> CP3204.SCR
  625. echo PUSH SI                >> CP3204.SCR
  626. echo PUSH SS                >> CP3204.SCR
  627. echo PUSH BX                >> CP3204.SCR
  628. echo MOV DI,7C3E            >> CP3204.SCR
  629. echo MOV CX,B               >> CP3204.SCR
  630. echo CLD                    >> CP3204.SCR
  631. echo REPZ                   >> CP3204.SCR
  632. echo MOVSB                  >> CP3204.SCR
  633. echo PUSH ES                >> CP3204.SCR
  634. echo POP DS                 >> CP3204.SCR
  635. echo MOV BYTE PTR [DI-2],F  >> CP3204.SCR
  636. echo MOV CX,[7C18]          >> CP3204.SCR
  637. echo MOV [DI-7],CL          >> CP3204.SCR
  638. echo MOV [BX+2],AX          >> CP3204.SCR
  639. echo MOV WORD PTR [BX],7C3E >> CP3204.SCR
  640. echo STI                    >> CP3204.SCR
  641. echo INT 13                 >> CP3204.SCR
  642. echo JC 4ED                 >> CP3204.SCR
  643. echo XOR AX,AX              >> CP3204.SCR
  644. echo CMP [7C13],AX          >> CP3204.SCR
  645. echo JZ 484                 >> CP3204.SCR
  646. echo MOV CX,[7C13]          >> CP3204.SCR
  647. echo MOV [7C20],CX          >> CP3204.SCR
  648. echo MOV AL,[7C10]          >> CP3204.SCR
  649. echo MUL WORD PTR [7C16]    >> CP3204.SCR
  650. echo ADD AX,[7C1C]          >> CP3204.SCR
  651. echo ADC DX,[7C1E]          >> CP3204.SCR
  652. echo ADD AX,[7C0E]          >> CP3204.SCR
  653. echo ADC DX,0               >> CP3204.SCR
  654. echo MOV [7C50],AX          >> CP3204.SCR
  655. echo MOV [7C52],DX          >> CP3204.SCR
  656. echo MOV [7C49],AX          >> CP3204.SCR
  657. echo MOV [7C4B],DX          >> CP3204.SCR
  658. echo MOV AX,20              >> CP3204.SCR
  659. echo MUL WORD PTR [7C11]    >> CP3204.SCR
  660. echo MOV BX,[7C0B]          >> CP3204.SCR
  661. echo ADD AX,BX              >> CP3204.SCR
  662. echo DEC AX                 >> CP3204.SCR
  663. echo DIV BX                 >> CP3204.SCR
  664. echo ADD [7C49],AX          >> CP3204.SCR
  665. echo ADC WORD PTR [7C4B],0  >> CP3204.SCR
  666. echo MOV BX,500             >> CP3204.SCR
  667. echo MOV DX,[7C52]          >> CP3204.SCR
  668. echo MOV AX,[7C50]          >> CP3204.SCR
  669. echo CALL 560               >> CP3204.SCR
  670. echo JC 4ED                 >> CP3204.SCR
  671. echo MOV AL,1               >> CP3204.SCR
  672. echo CALL 581               >> CP3204.SCR
  673. echo JC 4ED                 >> CP3204.SCR
  674. echo MOV DI,BX              >> CP3204.SCR
  675. echo MOV CX,B               >> CP3204.SCR
  676. echo MOV SI,7DE6            >> CP3204.SCR
  677. echo REPZ                   >> CP3204.SCR
  678. echo CMPSB                  >> CP3204.SCR
  679. echo JNZ 4ED                >> CP3204.SCR
  680. echo LEA DI,[BX+20]         >> CP3204.SCR
  681. echo MOV CX,B               >> CP3204.SCR
  682. echo REPZ                   >> CP3204.SCR
  683. echo CMPSB                  >> CP3204.SCR
  684. echo JZ 505                 >> CP3204.SCR
  685. echo MOV SI,7D9E            >> CP3204.SCR
  686. echo CALL 552               >> CP3204.SCR
  687. echo XOR AX,AX              >> CP3204.SCR
  688. echo INT 16                 >> CP3204.SCR
  689. echo POP SI                 >> CP3204.SCR
  690. echo POP DS                 >> CP3204.SCR
  691. echo POP [SI]               >> CP3204.SCR
  692. echo POP [SI+2]             >> CP3204.SCR
  693. echo INT 19                 >> CP3204.SCR
  694. echo POP AX                 >> CP3204.SCR
  695. echo POP AX                 >> CP3204.SCR
  696. echo POP AX                 >> CP3204.SCR
  697. echo JMP 4ED                >> CP3204.SCR
  698. echo MOV AX,[BX+1A]         >> CP3204.SCR
  699. echo DEC AX                 >> CP3204.SCR
  700. echo DEC AX                 >> CP3204.SCR
  701. echo MOV BL,[7C0D]          >> CP3204.SCR
  702. echo XOR BH,BH              >> CP3204.SCR
  703. echo MUL BX                 >> CP3204.SCR
  704. echo ADD AX,[7C49]          >> CP3204.SCR
  705. echo ADC DX,[7C4B]          >> CP3204.SCR
  706. echo MOV BX,700             >> CP3204.SCR
  707. echo MOV CX,3               >> CP3204.SCR
  708. echo PUSH AX                >> CP3204.SCR
  709. echo PUSH DX                >> CP3204.SCR
  710. echo PUSH CX                >> CP3204.SCR
  711. echo CALL 560               >> CP3204.SCR
  712. echo JC 500                 >> CP3204.SCR
  713. echo MOV AL,1               >> CP3204.SCR
  714. echo CALL 581               >> CP3204.SCR
  715. echo POP CX                 >> CP3204.SCR
  716. echo POP DX                 >> CP3204.SCR
  717. echo POP AX                 >> CP3204.SCR
  718. echo JC 4ED                 >> CP3204.SCR
  719. echo ADD AX,1               >> CP3204.SCR
  720. echo ADC DX,0               >> CP3204.SCR
  721. echo ADD BX,[7C0B]          >> CP3204.SCR
  722. echo LOOP 520               >> CP3204.SCR
  723. echo MOV CH,[7C15]          >> CP3204.SCR
  724. echo MOV DL,[7C24]          >> CP3204.SCR
  725. echo MOV BX,[7C49]          >> CP3204.SCR
  726. echo MOV AX,[7C4B]          >> CP3204.SCR
  727. echo JMP 70:0               >> CP3204.SCR
  728. echo LODSB                  >> CP3204.SCR
  729. echo OR AL,AL               >> CP3204.SCR
  730. echo JZ 580                 >> CP3204.SCR
  731. echo MOV AH,E               >> CP3204.SCR
  732. echo MOV BX,7               >> CP3204.SCR
  733. echo INT 10                 >> CP3204.SCR
  734. echo JMP 552                >> CP3204.SCR
  735. echo CMP DX,[7C18]          >> CP3204.SCR
  736. echo JNC 57F                >> CP3204.SCR
  737. echo DIV WORD PTR [7C18]    >> CP3204.SCR
  738. echo INC DL                 >> CP3204.SCR
  739. echo MOV [7C4F],DL          >> CP3204.SCR
  740. echo XOR DX,DX              >> CP3204.SCR
  741. echo DIV WORD PTR [7C1A]    >> CP3204.SCR
  742. echo MOV [7C25],DL          >> CP3204.SCR
  743. echo MOV [7C4D],AX          >> CP3204.SCR
  744. echo CLC                    >> CP3204.SCR
  745. echo RET                    >> CP3204.SCR
  746. echo STC                    >> CP3204.SCR
  747. echo RET                    >> CP3204.SCR
  748. echo MOV AH,2               >> CP3204.SCR
  749. echo MOV DX,[7C4D]          >> CP3204.SCR
  750. echo MOV CL,6               >> CP3204.SCR
  751. echo SHL DH,CL              >> CP3204.SCR
  752. echo OR DH,[7C4F]           >> CP3204.SCR
  753. echo MOV CX,DX              >> CP3204.SCR
  754. echo XCHG CH,CL             >> CP3204.SCR
  755. echo MOV DL,[7C24]          >> CP3204.SCR
  756. echo MOV DH,[7C25]          >> CP3204.SCR
  757. echo INT 13                 >> CP3204.SCR
  758. echo RET                    >> CP3204.SCR
  759. echo                      >> CP3204.SCR
  760. rem  Use CTRL-H (BACKSPACE) character for ^H shown on the line above.
  761.  
  762. echo E 59E D A "Non-system disk or disk error"        >> CP3204.SCR
  763. echo E 5BD D A "Replace and press any key when ready" >> CP3204.SCR
  764. echo E 5E3 D A 0                                      >> CP3204.SCR
  765.  
  766. rem  Define DOS system file names (11-characters each)
  767. echo E 5E6 "IO      SYS" >> CP3204.SCR
  768. echo E 5F1 "MSDOS   SYS" >> CP3204.SCR
  769.  
  770. :PUTSIGN
  771. rem  The two bytes below MUST be as shown in order for the BIOS the recognize
  772. rem  the fixed disk.  The bytes represent that the boot sector is valid.
  773. rem  Write signature to indicate valid boot sector.
  774. echo E 5FE 55 AA >> CP3204.SCR
  775.  
  776. echo   creation of DOS boot sector complete . . .
  777.  
  778. rem  Write FAT ID bytes to 1st FAT sector.
  779. echo E 600 F8 FF FF FF >> CP3204.SCR
  780.  
  781. rem  ═══════════════════════════════════════════════════════════════════════════════
  782.  
  783. rem  Shown on the following pages is the partition table for each logical drive.
  784. rem  The partition table for each logical drive fits nicely on one page.  There
  785. rem  are four (4) partition tables for the 1st fixed disk and five (5) partition
  786. rem  tables for the 2nd fixed disk.  The entire 2nd fixed disk is setup as an
  787. rem  EXTENDed partition and so requires a Master Partition Table.  An explanation
  788. rem  is contained on the page where the Master Partition Table for the 2nd fixed
  789. rem  disk is defined.
  790.  
  791. rem  By studying the partition tables, you should be able to create a DOC file
  792. rem  to partition your particular fixed disk.  Use this DOC file as a guide and
  793. rem  work carefully.  Remember to backup your fixed disk before using the program
  794. rem  to partition your fixed disk.
  795.  
  796. rem  Shown below for reference is the list of valid system ID codes which can
  797. rem  be entered into the partition table.  The SYSTEM codes were determined using
  798. rem  the Norton Utilites v5.0 DISKEDIT program to look at the fixed disk partition
  799. rem  tables.
  800.  
  801.  
  802. rem                      V A L I D   S Y S T E M   I D   C O D E
  803. rem  ═══════════════════════════════════════════════════════════════════════════════
  804. rem   00 ── indicates an unused partition
  805. rem   01 ── DOS-12
  806. rem   02 ── XENIX
  807. rem   04 ── DOS-16
  808. rem   05 ── EXTEND
  809. rem   06 ── BIGDOS
  810. rem   07 ── HPFS
  811. rem   08 ── Split
  812. rem   50 ── DM
  813. rem   56 ── GB
  814. rem   61 ── NOVELL
  815. rem   63 ── PCIX
  816. rem   64 ── CP/M
  817. rem   75 ── Speed
  818. rem   DB ── BBT
  819. rem   FF ── 386/ix
  820.  
  821. rem  NOTE:  The above values are in hex.
  822.  
  823. rem 
  824. :DISK1
  825.  
  826. rem If 2nd fixed disk option was chosen,
  827. rem jump to partition information for 2nd fixed disk.
  828. if [%1]==[/2] goto DISK2
  829.  
  830. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  831. rem  ═══════════════════════════════════════════════════════════════════════════════
  832. rem  FDISK1 VOL1 ── logical drive C:
  833. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  834. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  835. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  836. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  837. rem  │BIGDOS│ Yes│  0       0      2  │ 14     135     51  │        1  │   104039  │
  838. rem  │EXTEND│ No │  0     136      1  │ 14     543     51  │   104040  │   312120  │
  839. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  840. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  841. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  842.  
  843. rem  Listed below is the RELATIVE location of each byte in the partition table.
  844. rem  The 16-byte list is repeated for each line in the partition table.  A
  845. rem  maximum of 4 partitions may be defined. The partition table begins at
  846. rem  sector offset 01BE.
  847.  
  848. rem  0000  00          ; partition status (active [80] or non-active [00])
  849. rem  0001  00          ; starting side
  850. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  851. rem  0003  00          ; starting cylinder (lower byte)
  852. rem  0004  00          ; system (see information on previous page for valid codes)
  853. rem  0005  00          ; ending side
  854. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  855. rem  0007  00          ; ending cylinder (lower byte)
  856. rem  0008  00 00 00 00 ; relative sectors
  857. rem  000C  00 00 00 00 ; number of sectors
  858.  
  859. rem  Finally, the actual partition table data.
  860. rem  Remember, data order is low-byte, then high-byte.
  861. echo E 3BE 80          >> CP3204.SCR
  862. echo E 3BF 00          >> CP3204.SCR
  863. echo E 3C0 02          >> CP3204.SCR
  864. echo E 3C1 00          >> CP3204.SCR
  865. echo E 3C2 06          >> CP3204.SCR
  866. echo E 3C3 0E          >> CP3204.SCR
  867. echo E 3C4 33          >> CP3204.SCR
  868. echo E 3C5 87          >> CP3204.SCR
  869. echo E 3C6 01 00 00 00 >> CP3204.SCR
  870. echo E 3CA 67 96 01 00 >> CP3204.SCR
  871.  
  872. echo E 3CE 00          >> CP3204.SCR
  873. echo E 3CF 00          >> CP3204.SCR
  874. echo E 3D0 01          >> CP3204.SCR
  875. echo E 3D1 88          >> CP3204.SCR
  876. echo E 3D2 05          >> CP3204.SCR
  877. echo E 3D3 0E          >> CP3204.SCR
  878. echo E 3D4 B3          >> CP3204.SCR
  879. echo E 3D5 1F          >> CP3204.SCR
  880. echo E 3D6 68 96 01 00 >> CP3204.SCR
  881. echo E 3DA 38 C3 04 00 >> CP3204.SCR
  882.  
  883. rem  Update volume label in BIOS Parameter Block.
  884. echo E 435 "1" >> CP3204.SCR
  885.  
  886. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  887. rem  go write partition sector, boot sector, and 1st FAT sector.
  888. echo %4 G=100 138 >> CP3204.SCR
  889.  
  890. rem  Clear the Partition Boot Program and DOS Boot Program.
  891. rem  They are NOT needed on logical drives in EXTENDed partitions.
  892. echo F 200 2E0 0 >> CP3204.SCR
  893. echo F 43E 5FD 0 >> CP3204.SCR
  894.  
  895. echo   creation of partition table for 1st logical drive complete . . .
  896.  
  897. rem 
  898. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  899. rem  ═══════════════════════════════════════════════════════════════════════════════
  900. rem  FDISK1 VOL2 ── logical drive D:
  901. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  902. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  903. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  904. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  905. rem  │BIGDOS│ No │  0     136      2  │ 14     271     51  │        1  │   104039  │
  906. rem  │EXTEND│ No │  0     272      1  │ 14     407     51  │   104040  │   104040  │
  907. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  908. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  909. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  910.  
  911. rem  Listed below is the RELATIVE location of each byte in the partition table.
  912. rem  The 16-byte list is repeated for each line in the partition table.  A
  913. rem  maximum of 4 partitions may be defined. The partition table begins at
  914. rem  sector offset 01BE.
  915.  
  916. rem  0000  00          ; partition status (active [80] or non-active [00])
  917. rem  0001  00          ; starting side
  918. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  919. rem  0003  00          ; starting cylinder (lower byte)
  920. rem  0004  00          ; system (see information on previous page for valid codes)
  921. rem  0005  00          ; ending side
  922. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  923. rem  0007  00          ; ending cylinder (lower byte)
  924. rem  0008  00 00 00 00 ; relative sectors
  925. rem  000C  00 00 00 00 ; number of sectors
  926.  
  927. rem  Finally, the actual partition table data.
  928. rem  Remember, data order is low-byte, then high-byte.
  929. echo E 3BE 00          >> CP3204.SCR
  930. echo E 3BF 00          >> CP3204.SCR
  931. echo E 3C0 02          >> CP3204.SCR
  932. echo E 3C1 88          >> CP3204.SCR
  933. echo E 3C2 06          >> CP3204.SCR
  934. echo E 3C3 0E          >> CP3204.SCR
  935. echo E 3C4 73          >> CP3204.SCR
  936. echo E 3C5 0F          >> CP3204.SCR
  937. echo E 3C6 01 00 00 00 >> CP3204.SCR
  938. echo E 3CA 67 96 01 00 >> CP3204.SCR
  939.  
  940. echo E 3CE 00          >> CP3204.SCR
  941. echo E 3CF 00          >> CP3204.SCR
  942. echo E 3D0 41          >> CP3204.SCR
  943. echo E 3D1 10          >> CP3204.SCR
  944. echo E 3D2 05          >> CP3204.SCR
  945. echo E 3D3 0E          >> CP3204.SCR
  946. echo E 3D4 73          >> CP3204.SCR
  947. echo E 3D5 97          >> CP3204.SCR
  948. echo E 3D6 68 96 01 00 >> CP3204.SCR
  949. echo E 3DA 68 96 01 00 >> CP3204.SCR
  950.  
  951. rem  Update partition program code to write data on correct cylinder.
  952. echo E 11D 01 88 >> CP3204.SCR
  953.  
  954. rem  Update volume label in BIOS Parameter Block.
  955. echo E 435 "2" >> CP3204.SCR
  956.  
  957. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  958. rem  go write partition sector, boot sector, and 1st FAT sector.
  959. echo %4 G=100 138 >> CP3204.SCR
  960.  
  961. echo   creation of partition table for 2nd logical drive complete . . .
  962.  
  963. rem 
  964. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  965. rem  ═══════════════════════════════════════════════════════════════════════════════
  966. rem  FDISK1 VOL3 ── logical drive E:
  967. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  968. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  969. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  970. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  971. rem  │BIGDOS│ Yes│  0     272      2  │ 14     407     51  │        1  │   104039  │
  972. rem  │EXTEND│ No │  0     408      1  │ 14     543     51  │   208080  │   104040  │
  973. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  974. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  975. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  976.  
  977. rem  Listed below is the RELATIVE location of each byte in the partition table.
  978. rem  The 16-byte list is repeated for each line in the partition table.  A
  979. rem  maximum of 4 partitions may be defined. The partition table begins at
  980. rem  sector offset 01BE.
  981.  
  982. rem  0000  00          ; partition status (active [80] or non-active [00])
  983. rem  0001  00          ; starting side
  984. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  985. rem  0003  00          ; starting cylinder (lower byte)
  986. rem  0004  00          ; system (see information on previous page for valid codes)
  987. rem  0005  00          ; ending side
  988. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  989. rem  0007  00          ; ending cylinder (lower byte)
  990. rem  0008  00 00 00 00 ; relative sectors
  991. rem  000C  00 00 00 00 ; number of sectors
  992.  
  993. rem  Finally, the actual partition table data.
  994. rem  Remember, data order is low-byte, then high-byte.
  995. echo E 3BE 00          >> CP3204.SCR
  996. echo E 3BF 00          >> CP3204.SCR
  997. echo E 3C0 42          >> CP3204.SCR
  998. echo E 3C1 10          >> CP3204.SCR
  999. echo E 3C2 06          >> CP3204.SCR
  1000. echo E 3C3 0E          >> CP3204.SCR
  1001. echo E 3C4 73          >> CP3204.SCR
  1002. echo E 3C5 97          >> CP3204.SCR
  1003. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1004. echo E 3CA 67 96 01 00 >> CP3204.SCR
  1005.  
  1006. echo E 3CE 00          >> CP3204.SCR
  1007. echo E 3CF 00          >> CP3204.SCR
  1008. echo E 3D0 41          >> CP3204.SCR
  1009. echo E 3D1 98          >> CP3204.SCR
  1010. echo E 3D2 05          >> CP3204.SCR
  1011. echo E 3D3 0E          >> CP3204.SCR
  1012. echo E 3D4 B3          >> CP3204.SCR
  1013. echo E 3D5 1F          >> CP3204.SCR
  1014. echo E 3D6 D0 2C 03 00 >> CP3204.SCR
  1015. echo E 3DA 68 96 01 00 >> CP3204.SCR
  1016.  
  1017. rem  Update partition program code to write data on correct cylinder.
  1018. echo E 11D 41 10 >> CP3204.SCR
  1019.  
  1020. rem  Update volume label in BIOS Parameter Block.
  1021. echo E 435 "3" >> CP3204.SCR
  1022.  
  1023. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1024. rem  go write partition sector, boot sector, and 1st FAT sector.
  1025. echo %4 G=100 138 >> CP3204.SCR
  1026.  
  1027. echo   creation of partition table for 3rd logical drive complete . . .
  1028.  
  1029. rem 
  1030. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1031. rem  ═══════════════════════════════════════════════════════════════════════════════
  1032. rem  FDISK1 VOL4 ── logical drive F:
  1033. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1034. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1035. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1036. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1037. rem  │BIGDOS│ No │  0     408      2  │ 14     543     51  │        1  │   104039  │
  1038. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1039. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1040. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1041. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1042.  
  1043. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1044. rem  The 16-byte list is repeated for each line in the partition table.  A
  1045. rem  maximum of 4 partitions may be defined. The partition table begins at
  1046. rem  sector offset 01BE.
  1047.  
  1048. rem  0000  00          ; partition status (active [80] or non-active [00])
  1049. rem  0001  00          ; starting side
  1050. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1051. rem  0003  00          ; starting cylinder (lower byte)
  1052. rem  0004  00          ; system (see information on previous page for valid codes)
  1053. rem  0005  00          ; ending side
  1054. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1055. rem  0007  00          ; ending cylinder (lower byte)
  1056. rem  0008  00 00 00 00 ; relative sectors
  1057. rem  000C  00 00 00 00 ; number of sectors
  1058.  
  1059. rem  Finally, the actual partition table data.
  1060. rem  Remember, data order is low-byte, then high-byte.
  1061. echo E 3BE 00          >> CP3204.SCR
  1062. echo E 3BF 00          >> CP3204.SCR
  1063. echo E 3C0 42          >> CP3204.SCR
  1064. echo E 3C1 98          >> CP3204.SCR
  1065. echo E 3C2 06          >> CP3204.SCR
  1066. echo E 3C3 0E          >> CP3204.SCR
  1067. echo E 3C4 B3          >> CP3204.SCR
  1068. echo E 3C5 1F          >> CP3204.SCR
  1069. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1070. echo E 3CA 67 96 01 00 >> CP3204.SCR
  1071.  
  1072. rem  No EXTENDed partition data in partition table of last logical drive.
  1073. echo F 3CE 3DD 0 >> CP3204.SCR
  1074.  
  1075. rem  Update partition program code to write data on correct cylinder.
  1076. echo E 11D 41 98 >> CP3204.SCR
  1077.  
  1078. rem  Update volume label in BIOS Parameter Block.
  1079. echo E 435 "4" >> CP3204.SCR
  1080.  
  1081. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1082. rem  go write partition sector, boot sector, and 1st FAT sector.
  1083. echo %4 G=100 >> CP3204.SCR
  1084.  
  1085. rem  Finally, end of DEBUG script for 1st fixed disk.
  1086. echo Q >> CP3204.SCR
  1087.  
  1088. echo   creation of partition table for 4th logical drive complete . . .
  1089. goto RUN
  1090.  
  1091. rem 
  1092. :DISK2
  1093. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1094. rem  ═══════════════════════════════════════════════════════════════════════════════
  1095. rem  Fixed Disk 2 ── Master Partition Table
  1096. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1097. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1098. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1099. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1100. rem  │EXTEND│ No │  0       0      2  │ 14     543     51  │        1  │   416159  │
  1101. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1102. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1103. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1104. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1105.  
  1106. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1107. rem  The 16-byte list is repeated for each line in the partition table.  A
  1108. rem  maximum of 4 partitions may be defined. The partition table begins at
  1109. rem  sector offset 01BE.
  1110.  
  1111. rem  0000  00          ; partition status (active [80] or non-active [00])
  1112. rem  0001  00          ; starting side
  1113. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1114. rem  0003  00          ; starting cylinder (lower byte)
  1115. rem  0004  00          ; system (see information on previous page for valid codes)
  1116. rem  0005  00          ; ending side
  1117. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1118. rem  0007  00          ; ending cylinder (lower byte)
  1119. rem  0008  00 00 00 00 ; relative sectors
  1120. rem  000C  00 00 00 00 ; number of sectors
  1121.  
  1122. rem  Finally, the actual partition table data.
  1123. rem  Remember, data order is low-byte, then high-byte.
  1124. echo E 3BE 00          >> CP3204.SCR
  1125. echo E 3BF 00          >> CP3204.SCR
  1126. echo E 3C0 02          >> CP3204.SCR
  1127. echo E 3C1 00          >> CP3204.SCR
  1128. echo E 3C2 05          >> CP3204.SCR
  1129. echo E 3C3 0E          >> CP3204.SCR
  1130. echo E 3C4 B3          >> CP3204.SCR
  1131. echo E 3C5 1F          >> CP3204.SCR
  1132. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1133. echo E 3CA 9F 59 06 00 >> CP3204.SCR
  1134.  
  1135. echo   creation of master partition table complete . . .
  1136.  
  1137. rem  A few words about partitioning the 2nd fixed disk are in order.  When the
  1138. rem  entire 2nd fixed disk is setup as an EXTENDed partition, the first sector
  1139. rem  contains the master partition table.  This is shown above.  Since there
  1140. rem  is an additional logical drive on the disk, an additional partition table
  1141. rem  is required for the first logical drive on the disk.  In order to conserve
  1142. rem  disk space and maintain the same logical structure as the 1st fixed disk,
  1143. rem  the additional partition table is placed in the 2nd sector on the disk.
  1144. rem
  1145. rem  The second sector then contains the partition table for the first logical
  1146. rem  drive AND the BIOS Parameter Block.  This is possible because the DOS boot
  1147. rem  program is not required.  The starting location entered in the partition
  1148. rem  table for first logical disk is the same as the starting location entered
  1149. rem  in the master partition table.  Study the master partition table above and
  1150. rem  the partition table for the first logical drive on the next page.  Make
  1151. rem  sure you understand what is happening before you try this with your
  1152. rem  particular system.
  1153.  
  1154. rem 
  1155. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1156. rem  ═══════════════════════════════════════════════════════════════════════════════
  1157. rem  FDISK2 VOL1 ── logical drive G:
  1158. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1159. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1160. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1161. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1162. rem  │BIGDOS│ No │  0       0      2  │ 14     135     51  │        1  │   104039  │
  1163. rem  │EXTEND│ No │  0     136      1  │ 14     271     51  │   104040  │   104040  │
  1164. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1165. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1166. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1167.  
  1168. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1169. rem  The 16-byte list is repeated for each line in the partition table.  A
  1170. rem  maximum of 4 partitions may be defined. The partition table begins at
  1171. rem  sector offset 01BE.
  1172.  
  1173. rem  0000  00          ; partition status (active [80] or non-active [00])
  1174. rem  0001  00          ; starting side
  1175. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1176. rem  0003  00          ; starting cylinder (lower byte)
  1177. rem  0004  00          ; system (see information on previous page for valid codes)
  1178. rem  0005  00          ; ending side
  1179. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1180. rem  0007  00          ; ending cylinder (lower byte)
  1181. rem  0008  00 00 00 00 ; relative sectors
  1182. rem  000C  00 00 00 00 ; number of sectors
  1183.  
  1184. rem  Finally, the actual partition table data.
  1185. rem  Remember, data order is low-byte, then high-byte.
  1186. echo E 5BE 00          >> CP3204.SCR
  1187. echo E 5BF 00          >> CP3204.SCR
  1188. echo E 5C0 02          >> CP3204.SCR
  1189. echo E 5C1 00          >> CP3204.SCR
  1190. echo E 5C2 06          >> CP3204.SCR
  1191. echo E 5C3 0E          >> CP3204.SCR
  1192. echo E 5C4 33          >> CP3204.SCR
  1193. echo E 5C5 87          >> CP3204.SCR
  1194. echo E 5C6 01 00 00 00 >> CP3204.SCR
  1195. echo E 5CA 67 96 01 00 >> CP3204.SCR
  1196.  
  1197. echo E 5CE 00          >> CP3204.SCR
  1198. echo E 5CF 00          >> CP3204.SCR
  1199. echo E 5D0 01          >> CP3204.SCR
  1200. echo E 5D1 88          >> CP3204.SCR
  1201. echo E 5D2 05          >> CP3204.SCR
  1202. echo E 5D3 0E          >> CP3204.SCR
  1203. echo E 5D4 73          >> CP3204.SCR
  1204. echo E 5D5 0F          >> CP3204.SCR
  1205. echo E 5D6 68 96 01 00 >> CP3204.SCR
  1206. echo E 5DA 68 96 01 00 >> CP3204.SCR
  1207.  
  1208. rem  Update volume label in BIOS Parameter Block.
  1209. echo E 435 "1" >> CP3204.SCR
  1210.  
  1211. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1212. rem  go write partition sector, boot sector, and 1st FAT sector.
  1213. echo %4 G=100 138 >> CP3204.SCR
  1214.  
  1215. rem  Clear partition table in boot sector.
  1216. echo F 5BE 5FD 0 >> CP3204.SCR
  1217.  
  1218. echo   creation of partition table for 1st logical drive complete . . .
  1219.  
  1220. rem 
  1221. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1222. rem  ═══════════════════════════════════════════════════════════════════════════════
  1223. rem  FDISK2 VOL2 ── logical drive H:
  1224. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1225. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1226. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1227. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1228. rem  │BIGDOS│ No │  0     136      2  │ 14     271     51  │        1  │   104039  │
  1229. rem  │EXTEND│ No │  0     272      1  │ 14     407     51  │   208080  │   104040  │
  1230. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1231. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1232. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1233.  
  1234. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1235. rem  The 16-byte list is repeated for each line in the partition table.  A
  1236. rem  maximum of 4 partitions may be defined. The partition table begins at
  1237. rem  sector offset 01BE.
  1238.  
  1239. rem  0000  00          ; partition status (active [80] or non-active [00])
  1240. rem  0001  00          ; starting side
  1241. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1242. rem  0003  00          ; starting cylinder (lower byte)
  1243. rem  0004  00          ; system (see information on previous page for valid codes)
  1244. rem  0005  00          ; ending side
  1245. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1246. rem  0007  00          ; ending cylinder (lower byte)
  1247. rem  0008  00 00 00 00 ; relative sectors
  1248. rem  000C  00 00 00 00 ; number of sectors
  1249.  
  1250. rem  Finally, the actual partition table data.
  1251. rem  Remember, data order is low-byte, then high-byte.
  1252. echo E 3BE 00          >> CP3204.SCR
  1253. echo E 3BF 00          >> CP3204.SCR
  1254. echo E 3C0 02          >> CP3204.SCR
  1255. echo E 3C1 88          >> CP3204.SCR
  1256. echo E 3C2 06          >> CP3204.SCR
  1257. echo E 3C3 0E          >> CP3204.SCR
  1258. echo E 3C4 73          >> CP3204.SCR
  1259. echo E 3C5 0F          >> CP3204.SCR
  1260. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1261. echo E 3CA 67 96 01 00 >> CP3204.SCR
  1262.  
  1263. echo E 3CE 00          >> CP3204.SCR
  1264. echo E 3CF 00          >> CP3204.SCR
  1265. echo E 3D0 41          >> CP3204.SCR
  1266. echo E 3D1 10          >> CP3204.SCR
  1267. echo E 3D2 05          >> CP3204.SCR
  1268. echo E 3D3 0E          >> CP3204.SCR
  1269. echo E 3D4 73          >> CP3204.SCR
  1270. echo E 3D5 97          >> CP3204.SCR
  1271. echo E 3D6 D0 2C 03 00 >> CP3204.SCR
  1272. echo E 3DA 68 96 01 00 >> CP3204.SCR
  1273.  
  1274. rem  Update partition program code to write data on correct cylinder.
  1275. echo E 11D 01 88 >> CP3204.SCR
  1276.  
  1277. rem  Update volume label in BIOS Parameter Block.
  1278. echo E 435 "2" >> CP3204.SCR
  1279.  
  1280. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1281. rem  go write partition sector, boot sector, and 1st FAT sector.
  1282. echo %4 G=100 138 >> CP3204.SCR
  1283.  
  1284. echo   creation of partition table for 2nd logical drive complete . . .
  1285.  
  1286. rem 
  1287. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1288. rem  ═══════════════════════════════════════════════════════════════════════════════
  1289. rem  FDISK2 VOL3 ── logical drive I:
  1290. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1291. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1292. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1293. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1294. rem  │BIGDOS│ Yes│  0     272      2  │ 14     407     51  │        1  │   104039  │
  1295. rem  │EXTEND│ No │  0     408      1  │ 14     543     51  │   312120  │   104040  │
  1296. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1297. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1298. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1299.  
  1300. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1301. rem  The 16-byte list is repeated for each line in the partition table.  A
  1302. rem  maximum of 4 partitions may be defined. The partition table begins at
  1303. rem  sector offset 01BE.
  1304.  
  1305. rem  0000  00          ; partition status (active [80] or non-active [00])
  1306. rem  0001  00          ; starting side
  1307. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1308. rem  0003  00          ; starting cylinder (lower byte)
  1309. rem  0004  00          ; system (see information on previous page for valid codes)
  1310. rem  0005  00          ; ending side
  1311. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1312. rem  0007  00          ; ending cylinder (lower byte)
  1313. rem  0008  00 00 00 00 ; relative sectors
  1314. rem  000C  00 00 00 00 ; number of sectors
  1315.  
  1316. rem  Finally, the actual partition table data.
  1317. rem  Remember, data order is low-byte, then high-byte.
  1318. echo E 3BE 00          >> CP3204.SCR
  1319. echo E 3BF 00          >> CP3204.SCR
  1320. echo E 3C0 42          >> CP3204.SCR
  1321. echo E 3C1 10          >> CP3204.SCR
  1322. echo E 3C2 06          >> CP3204.SCR
  1323. echo E 3C3 0E          >> CP3204.SCR
  1324. echo E 3C4 73          >> CP3204.SCR
  1325. echo E 3C5 97          >> CP3204.SCR
  1326. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1327. echo E 3CA 67 96 01 00 >> CP3204.SCR
  1328.  
  1329. echo E 3CE 00          >> CP3204.SCR
  1330. echo E 3CF 00          >> CP3204.SCR
  1331. echo E 3D0 41          >> CP3204.SCR
  1332. echo E 3D1 98          >> CP3204.SCR
  1333. echo E 3D2 05          >> CP3204.SCR
  1334. echo E 3D3 0E          >> CP3204.SCR
  1335. echo E 3D4 B3          >> CP3204.SCR
  1336. echo E 3D5 1F          >> CP3204.SCR
  1337. echo E 3D6 38 C3 04 00 >> CP3204.SCR
  1338. echo E 3DA 68 96 01 00 >> CP3204.SCR
  1339.  
  1340. rem  Update partition program code to write data on correct cylinder.
  1341. echo E 11D 41 10 >> CP3204.SCR
  1342.  
  1343. rem  Update volume label in BIOS Parameter Block.
  1344. echo E 435 "3" >> CP3204.SCR
  1345.  
  1346. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1347. rem  go write partition sector, boot sector, and 1st FAT sector.
  1348. echo %4 G=100 138 >> CP3204.SCR
  1349.  
  1350. echo   creation of partition table for 3rd logical drive complete . . .
  1351.  
  1352. rem 
  1353. rem          F I X E D   D I S K   D R I V E   P A R T I T I O N   T A B L E
  1354. rem  ═══════════════════════════════════════════════════════════════════════════════
  1355. rem  FDISK2 VOL4 ── logical drive J:
  1356. rem  ┌──────┬────┬────────────────────┬────────────────────┬───────────┬───────────┐
  1357. rem  │      │    │ Starting Location  │  Ending Location   │  Relative │ Number of │
  1358. rem  │System│Boot│Side Cylinder Sector│Side Cylinder Sector│  Sectors  │  Sectors  │
  1359. rem  ├──────┼────┼────────────────────┼────────────────────┼───────────┼───────────┤
  1360. rem  │BIGDOS│ No │  0     408      2  │ 14     543     51  │        1  │   104039  │
  1361. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1362. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1363. rem  │unused│ No │  0       0      0  │  0       0      0  │        0  │        0  │
  1364. rem  └──────┴────┴────────────────────┴────────────────────┴───────────┴───────────┘
  1365.  
  1366. rem  Listed below is the RELATIVE location of each byte in the partition table.
  1367. rem  The 16-byte list is repeated for each line in the partition table.  A
  1368. rem  maximum of 4 partitions may be defined. The partition table begins at
  1369. rem  sector offset 01BE.
  1370.  
  1371. rem  0000  00          ; partition status (active [80] or non-active [00])
  1372. rem  0001  00          ; starting side
  1373. rem  0002  00          ; starting sector (lower 6-bits, upper 2-bits for cylinder)
  1374. rem  0003  00          ; starting cylinder (lower byte)
  1375. rem  0004  00          ; system (see information on previous page for valid codes)
  1376. rem  0005  00          ; ending side
  1377. rem  0006  00          ; ending sector (lower 6-bits, upper 2-bits for cylinder)
  1378. rem  0007  00          ; ending cylinder (lower byte)
  1379. rem  0008  00 00 00 00 ; relative sectors
  1380. rem  000C  00 00 00 00 ; number of sectors
  1381.  
  1382. rem  Finally, the actual partition table data.
  1383. rem  Remember, data order is low-byte, then high-byte.
  1384. echo E 3BE 00          >> CP3204.SCR
  1385. echo E 3BF 00          >> CP3204.SCR
  1386. echo E 3C0 42          >> CP3204.SCR
  1387. echo E 3C1 98          >> CP3204.SCR
  1388. echo E 3C2 06          >> CP3204.SCR
  1389. echo E 3C3 0E          >> CP3204.SCR
  1390. echo E 3C4 B3          >> CP3204.SCR
  1391. echo E 3C5 1F          >> CP3204.SCR
  1392. echo E 3C6 01 00 00 00 >> CP3204.SCR
  1393. echo E 3CA 67 96 01 00 >> CP3204.SCR
  1394.  
  1395. rem  No EXTENDed partition data in partition table of last logical drive.
  1396. echo F 3CE 3DD 0 >> CP3204.SCR
  1397.  
  1398. rem  Update partition program code to write data on correct cylinder.
  1399. echo E 11D 41 98 >> CP3204.SCR
  1400.  
  1401. rem  Update volume label in BIOS Parameter Block.
  1402. echo E 435 "4" >> CP3204.SCR
  1403.  
  1404. rem  If REM option was chosen, don't execute partition program.  Otherwise,
  1405. rem  go write partition sector, boot sector, and 1st FAT sector.
  1406. echo %4 G=100 >> CP3204.SCR
  1407.  
  1408. rem  Finally, end of DEBUG script for 2nd fixed disk.
  1409. echo Q >> CP3204.SCR
  1410.  
  1411. echo   creation of partition table for 4th logical drive complete . . .
  1412.  
  1413. rem 
  1414. :RUN
  1415. echo END - creation of CP3204.SCR
  1416. echo  
  1417. goto @%OPTION%
  1418.  
  1419. :@PREPARE
  1420. if NOT EXIST prepare.bin goto ERR0
  1421.   ren prepare.bin prepare.com
  1422.   echo BEGIN:  Fixed disk [%1] preparation . . .
  1423.   %4 prepare %1 /P
  1424.   echo  
  1425.   if ERRORLEVEL 1 goto ERR1
  1426.   if ERRORLEVEL 0 goto @RESTORE
  1427.  
  1428.   echo ERROR:  Invalid ERRORLEVEL during fixed disk [%1] preparation.
  1429.   goto EXIT
  1430.  
  1431. :@RESTORE
  1432. echo BEGIN:  Fixed disk [%1] partitioning . . .
  1433. debug < CP3204.SCR > %OUTFILE%
  1434. echo  
  1435. if ERRORLEVEL 128 goto ERR128
  1436. if ERRORLEVEL 2   goto ERR2
  1437. if ERRORLEVEL 0   goto OK
  1438.  
  1439. echo ERROR:  Invalid ERRORLEVEL during fixed disk [%1] partitioning.
  1440. goto EXIT
  1441.  
  1442. :ERR0
  1443. echo ERROR:  The file PREPARE.BIN is missing.  Unable to prepare fixed disk [%1].
  1444. goto EXIT
  1445.  
  1446. :ERR1
  1447. echo ERROR:  Unable to clear sectors during fixed disk [%1] preparation.
  1448. goto EXIT
  1449.  
  1450. :ERR2
  1451. echo ERROR:  Unable to write partition sectors to fixed disk [%1].
  1452. goto EXIT
  1453.  
  1454. :ERR128
  1455. echo ERROR:  Incorrect DOS version.  This program required DOS 5.00 or higher.
  1456. goto EXIT
  1457.  
  1458. :@
  1459. echo ERROR:  Environment variable OPTION not set.  Unable to continue.
  1460. goto EXIT
  1461.  
  1462. :OK
  1463. echo Partition sectors sucessfully written to fixed disk.
  1464. echo  
  1465. echo !!!!!!!!!!!!!!!!!!!! W A R N I N G !!!!!!!!!!!!!!!!!!!!
  1466. echo Do NOT use the FORMAT command to format fixed disk [%1].
  1467. echo All logical drives have been formatted by this program.
  1468. echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  1469. echo  
  1470. echo Press CTRL-ALT-DEL to reboot . . .
  1471.  
  1472. :EXIT
  1473. set OPTION=
  1474. set OUTFILE=
  1475. if EXIST prepare.com ren prepare.com prepare.bin
  1476. if [%1]==[/1] if exist CP3204.SCR ren CP3204.SCR CP3204.1%2%4
  1477. if [%1]==[/2] if exist CP3204.SCR ren CP3204.SCR CP3204.2%2%4
  1478. echo  
  1479.